package com.atrix.CinemaView.pojo;

import com.atrix.CinemaView.utils.FileUtil;
import lombok.Data;

import java.io.File;

@Data
public class FileObj {
    // 类型
    protected String name;
    // 名称
    protected String type;
    // 文件
    protected File data;
    
    public FileObj(String name, String type, File data) {
        this.name = name;
        this.type = type;
        this.data = data;
    }

    public FileObj(File file) {
        this.name = file.getName();
        this.type = FileUtil.getType(this.name);
        this.data = file;
    }
}
